﻿
using Engine.Graphics;
using Game;
using Neorxna.NeoModel;

namespace NekoMeko.Common
{
	public class NekoResModel : NekoMekoResource
	{
		public string Gender
		{
			get; set;
		}
		public string BoneSet
		{
			get; set;
		}
		public string DefaultSkinKey
		{
			get; set;
		}
		public bool AllowClotheOverride
		{
			get; set;
		} = false;

		public override object GetRes(string resPath, bool throwOnNotFound = true)
		{
			if(NekoMekoDataManager.ModelsInResPack.TryGetValue(resPath, out var res))
				return res;
			return ContentManager.Get<Model>(resPath, throwOnNotFound: throwOnNotFound);
		}

		public BoneSet GetBoneSet() => NekoMekoDataManager.FindBoneSet(BoneSet);
	}
}
